<%--
  Created by IntelliJ IDEA.
  User: 我爱陈果果
  Date: 2021/1/7
  Time: 10:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../basePath.jsp"%>
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title>品优购，欢迎登录</title>

    <link rel="stylesheet" type="text/css" href="${basePath}staticDwm/css/webbase.css" />
    <link rel="stylesheet" type="text/css" href="${basePath}staticDwm/css/pages-login.css" />
</head>

<body>
<div class="login-box">
    <!--head-->
    <div class="py-container logoArea">
        <a href="" class="logo"></a>
    </div>
    <!--loginArea-->
    <div class="loginArea">
        <div class="py-container login">
            <div class="loginform">
                <h2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    登录账户</h2>
                <div class="tab-content tab-wraped">
                    <div id="profile" class="tab-pane  active">
                        <form class="sui-form">
                            <div class="input-prepend"><span class="add-on loginname"></span>
                                <input id="username" type="text" placeholder="用户名/手机号" class="span2 input-xfat">
                            </div>
                            <div class="input-prepend"><span class="add-on loginpwd"></span>
                                <input id="password" type="password" placeholder="请输入密码" class="span2 input-xfat">
                            </div>
                            <div class="setting">
                                <span class="register"><a href="${basePath}dwm1/register" target="_parent">立即注册</a></span>
                                <span class="forget">忘记密码？</span>
                            </div>
                            <div class="logined">
<%--                                <a class="sui-btn btn-block btn-xlarge btn-danger" href="index.html" >登&nbsp;&nbsp;录</a>--%>
                                <input class="sui-btn btn-block btn-xlarge btn-danger" type="button" onclick="Login()" value="登&nbsp;&nbsp;陆">
                            </div>
                        </form>
                        <div class="otherlogin">
                        </div>
                    </div>
            </div>
        </div>
    </div>
    <!--foot-->
    <div class="py-container copyright">
        <ul>
            <li>关于我们</li>
            <li>联系我们</li>
            <li>联系客服</li>
            <li>商家入驻</li>
            <li>营销中心</li>
            <li>手机品优购</li>
            <li>销售联盟</li>
            <li>品优购社区</li>
        </ul>
        <div class="address">地址：北京市昌平区建材城西路金燕龙办公楼一层 邮编：100096 电话：400-618-4000 传真：010-82935100</div>
        <div class="beian">京ICP备08001421号京公网安备110108007702
        </div>
    </div>
</div>

<script type="text/javascript" src="${basePath}staticDwm/js/plugins/jquery/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}staticDwm/js/plugins/jquery.easing/jquery.easing.min.js"></script>
<script type="text/javascript" src="${basePath}staticDwm/js/plugins/sui/sui.min.js"></script>
<script type="text/javascript" src="${basePath}staticDwm/js/plugins/jquery-placeholder/jquery.placeholder.min.js"></script>
<script type="text/javascript" src="${basePath}staticDwm/js/pages/login.js"></script>
</div>
<script type="text/javascript">
    function Login() {
        let username = document.getElementById("username").value;
        let password = document.getElementById("password").value;
        // alert(username+","+password)\\
        if (username && password) {
            $.get("${basePath}dwm1/login?password="+password+"&username="+username, function (data) {
                if (data == "false") {
                    alert("账号或密码错误")
                }else if (data == "true"){
                    window.location.href="${basePath}dwm1/in";
                }
            });
        }
    }
</script>
</body>

</html>
